/**
 * 屏幕适配相关demo
 */
import 'package:flutter_benchu/utils/commonPkg.dart';

class ApiDemoPage extends StatefulWidget {
  @override
  State<StatefulWidget> createState() => _ApiDemoPageState();
}

class _ApiDemoPageState extends State<ApiDemoPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text('请求相关')),
      body: Column(
        children: [
          InkWell(
            onTap: () async {
              var res = await userApi.getUserData();
              if (apiIsError(res)) return;
              Log.v(res['data'][0]);

              //  AppNotifier appNotifier = Provider.of<AppNotifier>(context);
              // final locale = context.watch<AppNotifier>().locale;
              // // print(locale);
              // print('sadsada');
            },
            child: Text("点击请求接口"),
          ),
        ],
      ),
    );
  }
}
